<template>
    <div class="module-box">
      <div style="flex:0 1 60%">
   
          <!-- 左 -->
          <!-- <dv-decoration-2 style="width:100%;height:30px; margin:auto;" /> -->
     
      </div>

      <div style="flex:0 1 60%">
           <!-- 中 -->
          <div style="display: flex;">
            <dv-decoration-8 style="height:30px; flex:1;" />
          <div style="flex:1; ">
            <dv-decoration-11 style="height:30px;color:grey;">{{ title }}</dv-decoration-11>
          </div>
            <dv-decoration-8 :reverse="true" style="height:30px;flex:1;" />
          </div>
          
      </div>

      <div style="flex:0 1 60%;text-align: right;   " >
        
          <!-- 右 -->
          <!-- <dv-decoration-2 style="width:100%;height:30px; transform: rotate(180deg);margin:auto;" /> -->
 
            <i class="el-icon-switch-button" @click="handleClick"></i>

      </div>
          
    </div>
</template>
<script>
export default {
    name: 'TitleMain',
    data() {
        return {
          
        }
    },
    props:["title"],
    methods: {
    handleClick() {
      // 处理点击事件的逻辑
      console.log('退出按钮被点击');
      this.$store.commit("delToken");
      this.$router.push({ path: "/dashboard" }).catch(()=>{});
      console.log(this.$store.state.token);

    }
  }
}
</script>
<style>
.container{

  text-align: right;
}
.logout{
 width: 45px;
 height: 30px;
 border: none;
 /* background-color: transparent; */
 background-image: '../assets/img/logout.png';
}
</style>
